<script setup>
import {initBackend} from 'absurd-sql/dist/indexeddb-main-thread';

function init() {
	let worker = new Worker(new URL('./worker.js', import.meta.url), {type:"module"});
	// This is only required because Safari doesn't support nested
	// workers. This installs a handler that will proxy creating web
	// workers through the main thread
	initBackend(worker);
}

init();
onMounted(() => {
	init()
})
</script>